-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): improve packages recognition when the package version is an external package #29529
base: master
Are you sure you want to change the base?
fix(core): improve packages recognition when the package version is an external package #29529
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
View your CI Pipeline Execution ↗ for commit ae7459c.
☁️ Nx Cloud last updated this comment at |
@Cammisuli can this PR be reviewed, please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe having the npm specific checks in the project graph builder is the best place for this. The reason for this is that the builder itself should be technology/package agnostic. The project graph will contain much more types of external nodes than just npm. For example, there could be cargo, gradle, pip, etc.
We should fix the area that is actually adding the external nodes which would be in the js plugin here:
nx/packages/nx/src/plugins/js/index.ts
Lines 63 to 80 in 21a1f4e
if (!lockFileNeedsReprocessing(lockFileHash)) { | |
const nodes = readCachedParsedLockFile().externalNodes; | |
parsedLockFile.externalNodes = nodes; | |
return { | |
externalNodes: nodes, | |
}; | |
} | |
const externalNodes = getLockFileNodes( | |
packageManager, | |
lockFileContents, | |
lockFileHash, | |
context | |
); | |
parsedLockFile.externalNodes = externalNodes; | |
return { | |
externalNodes, | |
}; |
Current Behavior
After updating from [email protected] to [email protected] our docusaurus dep starts blocking us from running any nx command because of the error described in the linked issue
Expected Behavior
Packages with such deps, like:
"react-helmet-async": "npm:@slorber/react-helmet-async@*"
shouldn't break any nx commandRelated Issue(s)
Fixes #27285